$(function(){
	
		$(window).resize(function() {
		  findDimensions();
		});
		
		var resizeWindow = function(){
			$('.header').css({"margin-top":"10px","margin-bottom":"10px"});
			$('.container').css({"height":"500px"});
			$('.loginPane').css({"margin-top":"40px"});
		}
		
		var restoreWindow = function(){
			$('.header').css({"margin-top":"100px","margin-bottom":"22px"});
			$('.container').css({"height":"600px"});
			$('.loginPane').css({"margin-top":"100px"});
		}
		var winWidth = 0;
        var winHeight = 0;
        function findDimensions()
        {
             if (window.innerWidth)
                   winWidth = window.innerWidth;
             else if ((document.body) && (document.body.clientWidth))
                   winWidth = document.body.clientWidth;
             if (window.innerHeight)
                   winHeight = window.innerHeight;
             else if ((document.body) && (document.body.clientHeight))
                   winHeight = document.body.clientHeight;
             if (document.documentElement  && document.documentElement.clientHeight &&
                                                  document.documentElement.clientWidth)
             {
                 winHeight = document.documentElement.clientHeight;
                 winWidth = document.documentElement.clientWidth;
             }
			 
			 if(winWidth<1500){
				resizeWindow();
			 }else{
				restoreWindow();
			 }
        }
        findDimensions();             
        window.onresize=findDimensions;	
});